import React from 'react';
import PropTypes from 'prop-types';
import DefaultCheckBox from '@welab/fx-ui/components/CheckBox';
// import fn from '@welab/fx-ui/components/PlateformHalf';
import SystemIcon from './SystemIcon';
import { checkBox as checkBoxTheme } from '../theme';

const CheckBox = props => (<DefaultCheckBox {...props} iconComponent={SystemIcon} />);
CheckBox.defaultProps = {
  checked: false,
  checkBoxStyle: 'checkBox',
  theme: checkBoxTheme,
};
CheckBox.propTypes = {
  /**
   * ### CheckBox 属性说明
   *
   * 单选或者复选框UI
   *
   * | Name | Type | Default | Details | isRequired |
   * | ------:| -----------:| -----------: | -----------: | ------:|
   * | theme | object | | 主题 | no |
   * | checked | bool | false | 是否选中 | no |
   * | checkBoxStyle | string | checkBox | 是否选中(radio或者checkBox) | no |
   *
   * ### CheckBox 代码示例(详见示例项目)
   *
   * ```html
   * <CheckBox theme={checkBox} checkBoxStyle="radio" checked/>
   * ```
   */
  theme: PropTypes.instanceOf(Object),
  checked: PropTypes.bool,
  checkBoxStyle: PropTypes.string,
};

export default CheckBox;
